﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace ThreeByte.ActiveDeck.Data.UserResponse.Report {

    [IndividualUserData(ShortTypeName="ShortAnswer")]
    public class ShortAnswerIndividualData : IndividualUserData {
        public ShortAnswerIndividualData(XElement node) : this() {
            Section = int.Parse(node.Attribute("Section").Value);
            Page = int.Parse(node.Attribute("Page").Value);
            Answer = node.Attribute("Answer").Value;
        }

        public ShortAnswerIndividualData() {
        }

        public string Answer {
            get;
            set;
        }

        //public override XElement ToXml() {
        //    XElement node = new XElement(ns + "ShortAnswer", new XAttribute("Section", Section), new XAttribute("Page", Page), new XAttribute("Answer", TextAnswer));

        //    return node;
        //}

        public override bool UpdateUserData(IndividualUserData newUserData) {
            throw new NotImplementedException();
        }
    }
}
